﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="usereg.aspx.cs" Inherits="Mocola.Net.Web.usereg" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>CsLand Ams v1.0 - 中新置地档案管理系统</title>
    <meta name="description" content="CsLand Ams v1.0 - 中新置地档案管理系统" />
    <meta http-equiv="X-UA-Compatible" content="IE=7" />
    <link rel="stylesheet" href="css/content.css" type="text/css" />
    <link rel="stylesheet" href="css/ui.css" type="text/css" />
    <link rel="stylesheet" href="css/sys.css" type="text/css" />
    <link rel="stylesheet" href="css/table.css" type="text/css" />
    <link rel="stylesheet" media="screen" href="css/vlaCal-v2.1.css" type="text/css" />
    <link rel="stylesheet" media="screen" href="css/vlaCal-v2.1-adobe_cs3.css" type="text/css" />
    <link rel="stylesheet" media="screen" href="css/vlaCal-v2.1-apple_widget.css" type="text/css" />
    <link rel="stylesheet" href="scripts/formcheck/theme/classic/formcheck.css" type="text/css"
        media="screen" />
    <!--[if IE]>
	    <script type="text/javascript" src="scripts/excanvas-compressed.js"></script>	
	    <style type="text/css"> html { overflow: auto; } </style>	
    <![endif]-->

    <script type="text/javascript" src="scripts/mootools-1.2-core.js"></script>
    <script type="text/javascript" src="scripts/mootools-1.2-more.js"></script>
    <script type="text/javascript" src="scripts/mocha.js"></script>
    <script type="text/javascript" src="scripts/mocola-funs.js"></script>
    <script type="text/javascript" src="scripts/tvChk.js"></script>

    <script type="text/javascript">
            function AddDays(form) 
            {  
               var s=$('<%=txtRiQi.ClientID%>').value; 
               if(s!="")
               {
                   var d=new Date(Date.parse(s.replace(/-/g,"/")));                
                   if(isNaN(d))
                   {
                        alert("日期填写有误！");
                        return;
                   } 
                   var leibie=gup("fid");
                   var daysAdd=leibie=="M"?30:15;         
         
                   var newtimems=d.getTime()+(daysAdd*24*60*60*1000);
                   d.setTime(newtimems);
                   $('<%=txtGuiHuaiRiQi.ClientID%>').value=d.toLocaleDateString(); 
               }
            }
            function chkData(number)
            {
                var dept=$('<%=ddlBumen.ClientID%>').options[$('<%=ddlBumen.ClientID%>').selectedIndex].value;
                var name=$('<%=txtShenQingRen.ClientID%>').value;                
                var riqi=$('<%=txtRiQi.ClientID%>').value;
                
                if(dept=="-1")
                {
                    alert("请选择部门！");
                    return false;
                }
                if(name=="")
                {
                    alert("请填写申请人！");
                    return false;
                }
                if(riqi=="")
                {
                    alert("请填写登记日期！");
                    return false;
                }
                var shuliang=$('<%=txtShuLiang.ClientID%>').value;
                if(isNaN(shuliang))
                {
                    alert("请输入正确的数量！");
                    return false;
                }
                if(shuliang<1)
                {
                    alert("登记数量必须大于1");
                    return false;
                }
                else
                {
                    if(shuliang>number)
                    {
                        alert("登记的数量不能超过现有的数量！");
                        return false;
                    }
                }
            }
    </script>
</head>
<body style="background:#fff">
    <form id="form1" runat="server">
    <div style="margin:10px;">
        <div class="title1" style="text-align: center">
            图纸/文件利用登记：</div>
        <div>
            部门：<asp:DropDownList ID="ddlBumen" runat="server">
            </asp:DropDownList>
            
            申请人：<asp:TextBox ID="txtShenQingRen" runat="server" Width="120px"
                Cssclass="inputbox"></asp:TextBox>
            日期：<asp:TextBox ID="txtRiQi" runat="server"  Width="110px" Cssclass="inputbox" onblur="AddDays();"></asp:TextBox></div>
        <div style="margin-top: 10px">
            <label>
                申请原因：</label>
            <div style="text-align: center;">
                <asp:TextBox ID="txtYuanYin" runat="server" Width="500px" Cssclass="inputbox" TextMode="MultiLine"
                    Height="95px"></asp:TextBox>
            </div>
        </div>
        <div style="margin-top: 10px; clear: both">
            <div style="width: 50%; float: left">
                <label>
                    申请方式：</label>
                <asp:RadioButtonList ID="rblShenQingFangShi" runat="server" RepeatDirection="Horizontal">
                    <asp:ListItem Value="0">领用</asp:ListItem>
                    <asp:ListItem Value="1" Selected="True">借用</asp:ListItem>
                    <asp:ListItem Value="2">打印</asp:ListItem>
                </asp:RadioButtonList>
            </div>
            <div style="width: 50%; float: left">
                <label>
                    申请内容：</label>
                <asp:CheckBoxList ID="cblShenQingNeiRong" runat="server" RepeatDirection="Horizontal">
                    <asp:ListItem Value="0">原件</asp:ListItem>
                    <asp:ListItem Value="1">复印件</asp:ListItem>
                    <asp:ListItem Value="2">光盘</asp:ListItem>
                </asp:CheckBoxList>
            </div>
        </div>
        <div style="margin-top: 10px; clear: both">
            <label>
                数量：</label><asp:TextBox ID="txtShuLiang" runat="server" Width="100px" Cssclass="inputbox"></asp:TextBox>&nbsp;&nbsp;&nbsp;&nbsp;
            最晚归还日期：<asp:TextBox ID="txtGuiHuaiRiQi" runat="server" Width="120px" ReadOnly="true"
                Cssclass="inputbox"></asp:TextBox>
        </div>
        <div style="margin-top: 25px; clear: both; text-align: center">
            <asp:Button ID="btnShenQing" runat="server" Text="登记" Width="120px" 
                CssClass="btnzc" onclick="btnShenQing_Click" />
        </div>
    </div>
    </form>
</body>
</html>
